﻿@using CoreData
@model IEnumerable<OrderDetail>
<div class="block-fluid table-sorting">
    <div class="row-fluid list">
        <div class="span12">
            @if (Model!=null&&Model.Count() > 0)
            {
                <table cellpadding="0" cellspacing="0" width="100%" class="table" id="tSortable">
                    <thead>
                        <tr>
                            <th>
                                Code
                            </th>
                            <th>
                                Special code
                            </th>
                            <th>
                                Special name
                            </th>
                            <th>
                                Money
                            </th>
                            <th>
                                Quality
                            </th>
                            <th>
                                Total money
                            </th>
                            @* <th>
                                Cập nhật
                            </th>*@
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model)
                        {
                            <tr>
                                <td>
                                    #@item.OrderID
                                </td>
                                <td>@item.ProductID
                                </td>
                                <td>
                                    @item.ProductNameExt
                                </td>
                                <td>@Helper.StringHelper.FormatCurrencyVN(item.Price)
                                </td>
                                <td>@Html.TextBoxFor(x => item.Amount, new { @class = "qty", data_Id = item.ID, data_orderId = item.OrderID })
                                </td>
                                <td>@Helper.StringHelper.FormatCurrencyVN(item.Total)
                                </td>
                                @* <td>
                                    <a title="Sửa" href="@Url.Action("AddOrUpdateDetail", "OrderManagement", new { id = item.ID })" class="icon-pencil">
                                    </a><a title="Xóa" href="@Url.Action("DeleteDetail", "OrderManagement", new { id = item.ID })" class="icon-trash" onclick="return confirm('Có chắc bạn muốn xóa ?');">
                                    </a>
                                </td>*@
                            </tr>
                        }
                    </tbody>
                </table>
            }
            else
            {
                <h2 class="error-text">
                    Not data here.
                </h2>
            }
        </div>
    </div>
</div>